<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<title>管理中心-KKR订餐管理系统</title>
<!--公共样式开始-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/reset.css">
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/common.css">
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Plugins/FontAwesome/css/font-awesome.min.css">
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Plugins/FontAwesome/css/font-awesome-ie7.min.css">
<![endif]-->
<!--公共样式结束-->
<!--页面样式开始-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/page_index.css">
<!--页面样式结束-->
<!--响应式样式开始-->
<!--宽屏电脑响应式-->
<link rel="stylesheet" media="screen and (min-width:1200px)" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/responsive_1200.css">
<!--普通电脑屏幕响应式-->
<link rel="stylesheet" media="screen and (min-width:992px) and (max-width:1199px)" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/responsive_992.css">
<!--Pad屏幕响应式-->
<link rel="stylesheet" media="screen and (min-width:768px) and (max-width:991px)" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/responsive_768.css">
<!--手机屏幕响应式-->
<link rel="stylesheet" media="screen and (max-width:767px)" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/responsive_767.css">
<!--响应式样式结束-->
<!--公共脚本开始-->
<script src="{$NOW_THEME_URL}/Assets/Js/jquery.min.js"></script>
<script src="{$NOW_THEME_URL}/Assets/Js/jquery.timer.js"></script>
<include file="Public:menu" />
<!--公共脚本结束-->
<!--弹窗特效引入开始-->
<script src="{$NOW_THEME_URL}/Assets/Plugins/LhgDialog/lhgdialog.js?skin=discuz"></script>
<!--弹窗特效引入结束-->
<!--右键菜单开始-->
<link href="{$NOW_THEME_URL}/Assets/Plugins/ContextMenu/src/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
<script src="{$NOW_THEME_URL}/Assets/Plugins/ContextMenu/src/jquery.ui.position.js"></script>
<script src="{$NOW_THEME_URL}/Assets/Plugins/ContextMenu/src/jquery.contextMenu.js"></script>
<style>
.white{
	color:#FFF;
}
.btn{
	padding:2px 5px;
	cursor:pointer;
}
</style>
<!--右键菜单结束-->
<script type="text/javascript">
$(function () {
	
	/* $.dialog({
		id:'Public_login',
		title:'用户登录',
		content: 'url:{:U("Public/login")}',
		lock:true,
		height:'100px',
        fixed:true,
		max:false,
		min:false,
		close: function(){                        
            //return false;
        }
	}); */
	
	$.contextMenu({
		selector: '#desktop',
		items: {
			"edit": {
				name: "更换桌面壁纸", 
				icon: "edit",
				callback: function(key, options) {
					$.dialog({
						id     : 'Public_desktop',
						content: 'url:'+'{:U("Public/desktop")}',
						width : '650px',
						height: '370px',
						title : '更换桌面壁纸'
					});
					windowManage();
				}
			},
			"delete": {
				name: "添加桌面快捷方式", 
				icon: "add",
				callback: function(key, options) {				
					$.dialog({
						id     : 'Public_addApp',
						content: 'url:'+'{:U("Public/addApp")}',
						width  : '750px',
						height : '450px',
						title  : '添加桌面快捷方式'
					});
					windowManage();
				}
			},
			"sep1": "---------",
			"about": {
				name: "关于KKR", 
				icon: "add",
				callback: function(key, options) {				
					window.open('http://www.kkrabbit.com.cn');
				}
			}
		}
	});
	
	/*最新消息提示开始*/
	function newSensi(config){
		/**********************配置参数开始**************************/
		if(typeof(config)=='undefined' || config==null){
			config = {};
		}
		var attr = {
				boxId : '#newSensi', //盒子Id
				content : {}, //内容
				voice : true  //是否声音提示
			};
		$.extend(attr, config);
		/**********************配置参数结束**************************/
		
		var html = '';
		html += '<ul>';
		$.each(attr.content,function(i,n){
			html += '<li class="openwin" ehref="'+n.ehref+'" etitle="'+n.etitle+'" ewidth="'+n.ewidth+'px" eheight="'+n.eheight+'px" id="'+n.eid+'">'+n.value+'</li>'
		});
		html += '</ul>';
		$(attr.boxId).find('.content').html(html);
		$(attr.boxId).slideToggle();
		if($(attr.boxId).attr('data-show')=='no'){
			$(attr.boxId).attr('data-show','ok');
			if(attr.voice){
				var suffix = 'ogg';
				if ($.browser.msie || $.browser.safari) {
					suffix = 'mp3';
				}
				$('#audioBox').html('<audio src="__PUBLIC__/Media/tis_new.'+suffix+'" controls="controls" autoplay="true"></audio>');
			}
		}else{
			$('#audioBox').html('');
			$(attr.boxId).attr('data-show','no');
		}		
	}
	//关闭最新消息窗口
	$('#newSensi .close').on('click',function(){
		$('#newSensi').hide();
		$('#newSensi').attr('data-show','no');
		return false;
	});	
	//设置最新消息
	$('#newSensi .set').on('click',function(){
		$('#newSensi .conset').toggle();
		return false;
	});
	//开启消息
	$('#newSensi .conset .left').on('click',function(){
		playNews();
		$('#newSensi .conset>div').removeClass('off').removeClass('on').addClass('on');
		$('.conset').hide();
		return false;
	});
	//关闭消息
	$('#newSensi .conset .right').on('click',function(){
		$('body').stopTime('getNewsTimer');
		$('#newSensi .conset>div').removeClass('on').removeClass('off').addClass('off');
		$('.conset').hide();
		return false;
	});
	
	function playNews(){
		$('body').everyTime('10s','getNewsTimer',function(){
			$.get("{:U('Index/getNews')}",function(data){
				if(!$.isEmptyObject(data) && data.content != 'null' && data.content != null){
					newSensi(data);
				}			
			},'json');		
		});
	}
	
	playNews();
	/*最新消息提示结束*/
});
</script>
</head>

<body>
	<!--页面主体背景开始-->
	<div id="themebg">
	</div>
	<!--页面主体背景结束-->
	<!--主导航开始-->
	<div id="navbar">
		<div class="navbar_top">
			<ul>
				
			</ul>
		</div>		
		<div class="navbar_bottom">
			<span></span>
		</div>
	</div>
	<!--主导航结束-->
	<ul id="cutover">
		<li class="current" for="desktop" title="我的桌面"></li>
		<li for="allpro" title="所有程序"></li>
	</ul>
	<!--桌面图标开始-->
	<div id="desktop">
		<ul>
			
		</ul>
	</div>
	<!--桌面图标结束-->
	<!--所有程序开始-->
	<div id="allpro" class="clearfix">
		<span class="allpro_left"></span>
		<span class="allpro_right"></span>
		<div class="allpro_center_bg clearfix">
			<div class="allpro_center clearfix">
				
				<volist name="menu.desk" id="v">
				
					<ul>
					
					<li class="openwin allpro_title" etitle="{$v.title}" ehref="{$v.url|U=###}" ewidth="{$v.config.width}px" eheight="{$v.config.height}px" id='{$v.url|str_replace="/","_",###}'>
						<span class="icon">
							<empty name="v.icon">
								<img src="__PUBLIC__/Images/icon_empty.png" />
							<else />
								<img src="__PUBLIC__/Plugins/EtNodeIcon/{$v.icon}" />						
							</empty>
						</span>
						<span class="text">{$v.title}</span>
					</li>
					
					<volist name="v['child']" id="k">
					
					<li class="openwin " ehref="{$k.url|U=###}" etitle="{$k.title}" ewidth="{$k.config.width}px" eheight="{$k.config.height}px" id='{$k.url|str_replace="/","_",###}'>
						<span class="icon">
							<empty name="k.icon">
								<img src="__PUBLIC__/Images/icon_empty.png" />
							<else />
								<img src="__PUBLIC__/Plugins/EtNodeIcon/{$k.icon}" />	
							</empty>
						</span>
						<span class="text">{$k.title}</span>
					</li>
					
					</volist>
					
					</ul>
					
				</volist>
						
				
			</div>
		</div>
	</div>
	<!--所有程序结束-->
	<!--任务栏开始-->
	<div id="taskbar">
		<div class="taskbar_bg">&nbsp;</div>
		<ul class="tasklist">
		</ul>
	</div>
	<!--任务栏结束-->
	<!--最新消息提示开始-->
	<div id="newSensi" data-show="no" style="display:none;">
		<h1>您有新的消息<span class="set"><i class="icon-cog"></i></span><span class="close"><i class="icon-remove-sign"></i></span></h1>
		<div class="conset">
			<div class="clearfix btn on">
				<span class="left">开启提醒</span>
				<span class="right">关闭提醒</span>
			</div>
		</div>
		<div class="content">
		</div>
		<div id="audioBox" style="display:none;"></div>
	</div>
	<!--最新消息提示结束-->
</body>
</html>
